/**
 * @(#)UserService.java, 十月 28, 2016.
 * <p>
 * Copyright 2016 fenbi.com. All rights reserved.
 * FENBI.COM PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.cloud.service;

import org.springframework.stereotype.Service;

/**
 * @author zhangpeng
 */
@Service
public class UserService {

//    @Autowired
//    RestTemplate restTemplate;
//
//
//    final String SERVICE_NAME = "springCloudClient";
//
//    @HystrixCommand(fallbackMethod = "fallbackSearchAll")
//    public List<UserDto> readUserInfo() {
//        return restTemplate.getForObject("http://" + SERVICE_NAME + "/v1/user/userData", List.class);
//    }
//
//    private List<UserDto> fallbackSearchAll() {
//        System.out.println("HystrixCommand fallbackMethod handle!");
//        List<UserDto> ls = new ArrayList<UserDto>();
//        UserDto user = new UserDto();
//        user.setUsername("TestHystrixCommand");
//        ls.add(user);
//        return ls;
//    }
}